<script setup>
import { ref } from 'vue';
import {useStore} from 'vuex';
const store = useStore()
const nick = ref('');
const id = ref('');
const showReg = ref(true)
function submitUserInfo(){
  store.commit('changeId',id.value);
  store.commit('changeNick',nick.value)
  showReg.value = false
}
</script>

<template>
<el-dialog v-model="showReg" title="个人信息">
  <el-form label-width="40px">
    <el-form-item label="id" >
      <el-input v-model="id"></el-input>
    </el-form-item>
    <el-form-item label="昵称">
      <el-input v-model="nick"></el-input>
    </el-form-item>
    <el-form-item>
      <el-button @click="submitUserInfo">确定</el-button>
    </el-form-item>
  </el-form>
</el-dialog>
</template>

<style scoped>

</style>
